let computed = {
  // 周转状态
  batchStatus() {
    let list = this.$store.state.dict.batchStatus.labels || []
    return this.addLabelAll(list)
  },
  // 周转推进状态(只是用于按钮修改)
  batchActionType() {
    return this.$store.state.dict.batchActionType.labels || []
  },
  // 批次周转进度状态
  batchProcessStatus() {
    return this.$store.state.dict.batchProcessStatus.labels || []
  },
  // 除“待工艺编制”之外的进度状态
  partBatchProcessStatus() {
    let list = this.batchProcessStatus.filter((item) => {
      return item.value !== 'InTechProc'
    })
    return this.addLabelAll(list)
  },
  partBatchProcessFilter() {
    return this.batchProcessStatus.filter((item) => {
      return item.value !== 'InTechProc'
    })
  },
  // 除“待工艺编制”之外进度状态id
  partBatchProcessId() {
    let ids = this.partBatchProcessStatus.map((item) => {
      return item.id
    })
    return ids.join(',')
  },
  // 搜索配置参数
  searchList() {
    let normalTurnoverBatchCol = [
      {prop: 'numberQueryByLike', label: '周转码', noChecked: true, noForCol: true, noExport: true},
      {
        prop: 'number',
        label: '周转码',
        noCheck: true,
        noSearch: true,
        colConfig: {
          sortable: 'custom',
          minWidth: 240,
          align: 'left',
          fixed: 'left',
        }
      },
      {
        prop: 'turnoverStatusLabel',
        label: '周转状态',
        filterAble: true,
        noCheck: true,
        searchConfig: {
          name: 'turnoverStatusId',
          type: 'select',
          dict: 'batchStatus',
          multiple: true
        },
        colConfig: {
          sortable: false,
          minWidth: 110,
          comp: 'turnoverStatus',
          fixed: 'left',
        }
      },
      {
        prop: 'turnoverProcessStatusLabel',
        label: '周转进度',
        filterAble: true,
        noCheck: true,
        searchConfig: {
          name: 'turnoverProcessStatusId',
          type: 'select',
          selectList: this.partBatchProcessFilter,
          multiple: true
        },
        colConfig: {
          sortable: false,
          minWidth: 140,
          comp: 'turnoverProgressStatus',
          fixed: 'left',
        }
      },
      {
        prop: 'createDate',
        label: '周转码创建时间',
        noCheck: true,
        noSearch: true,
        searchConfig: {
          name: 'createDate',
          type: 'date'
        },
        colConfig: {
          minWidth: 160,
          sortable: 'custom',
          format: 'YYYY-MM-DD hh:mm:ss',
        }
      },
      {
        prop: 'weekPlanName',
        label: '关联周计划',
        noCheck: true,
        noSearch: true,
        colConfig: {
          minWidth: 240,
          sortable: 'custom',
        }
      },
      {
        prop: 'productionQuantity',
        label: '计划数量',
        noCheck: true,
        noSearch: true,
        colConfig: {
          minWidth: 100,
          sortable: 'custom',
        }
      },
      {
        prop: 'trackDemandLabel',
        label: '追溯要求',
        noCheck: true,
        noSearch: true,
        colConfig: {
          minWidth: 100,
          sortable: 'custom',
        }
      },
      {
        prop: 'planStartDate',
        label: '计划开始时间',
        noCheck: true,
        noSearch: true,
        searchConfig: {
          name: 'planStartDate',
          type: 'date'
        },
        colConfig: {
          minWidth: 140,
          sortable: 'custom',
          formatToDay: true,
        }
      },
      {
        prop: 'planEndDate',
        label: '计划完成时间',
        noCheck: true,
        noSearch: true,
        searchConfig: {
          name: 'planEndDate',
          type: 'date'
        },
        colConfig: {
          minWidth: 140,
          sortable: 'custom',
          formatToDay: true,
        }
      },
      {
        prop: 'practicalStartDate',
        label: '实际开始时间',
        noCheck: true,
        noSearch: true,
        searchConfig: {
          name: 'practicalStartDate',
          type: 'date'
        },
        colConfig: {
          minWidth: 180,
          sortable: 'custom',
          format: 'YYYY-MM-DD hh:mm:ss',
        }
      },
      {
        prop: 'practicalEndDate',
        label: '实际完成时间',
        noCheck: true,
        noSearch: true,
        searchConfig: {
          name: 'practicalEndDate',
          type: 'date'
        },
        colConfig: {
          minWidth: 180,
          sortable: 'custom',
          format: 'YYYY-MM-DD hh:mm:ss',
        }
      },
      {
        prop: 'currentWorkstageNames',
        label: '当前工序',
        noCheck: true,
        noSearch: true,
        colConfig: {
          minWidth: 120,
          sortable: 'custom',
        }
      },
      {
        prop: 'serialNumber',
        label: '序列号',
        colConfig: {minWidth: 120, align: 'left', sortable: false}
      },
      {
        prop: 'taskTypeLabel',
        label: '任务类型',
        noCheck: true,
        searchConfig: {
          name: 'taskTypeId',
          type: 'select',
          dict: 'turnoverTaskType'
        },
        colConfig: {
          minWidth: 120,
          comp: 'taskType',
          align: 'left',
        }
      },
    ]
    return normalTurnoverBatchCol
  },
  // 列循环
  columnList() {
    return this.searchList.filter(item => item.noForCol !== true)
  },
}
export default computed
